package com.seanchenxi.gwt.wordpress.xmlrpc.service.local.impl;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.seanchenxi.gwt.wordpress.domain.model.PostList;
import com.seanchenxi.gwt.wordpress.domain.model.SimpleCategory;
import com.seanchenxi.gwt.wordpress.domain.model.TrackBackPing;
import com.seanchenxi.gwt.wordpress.xmlrpc.service.MovableTypeLocalServiceAsync;

public class MovableTypeLocalServiceAsyncImpl extends MovableTypeLocalServiceAsyncWrapper implements MovableTypeLocalServiceAsync{

	public MovableTypeLocalServiceAsyncImpl(String url, String wpUserName,
			String wpPassword) {
		super(url, wpUserName, wpPassword);
	}

	@Override
	public void getCategoryList(int blogId,
			AsyncCallback<ArrayList<SimpleCategory>> callback) {
		getMovableTypeService().getCategoryList(blogId, getWpUserName(), getWpPassword(), callback);
	}

	@Override
	public void getRecentPostTitles(int blogId, int number,
			AsyncCallback<ArrayList<PostList>> callback) {
		getMovableTypeService().getRecentPostTitles(blogId, getWpUserName(), getWpPassword(), number, callback);
	}

	@Override
	public void getPostCategories(int postId,
			AsyncCallback<ArrayList<SimpleCategory>> callback) {
		getMovableTypeService().getPostCategories(postId, getWpUserName(), getWpPassword(), callback);
	}

	@Override
	public void setPostCategories(int postId,
			ArrayList<SimpleCategory> categories,
			AsyncCallback<Boolean> callback) {
		getMovableTypeService().setPostCategories(postId, getWpUserName(), getWpPassword(), categories, callback);
	}

	@Override
	public void supportedMethods(AsyncCallback<Object> callback) {
		getMovableTypeService().supportedMethods(callback);

	}

	@Override
	public void getTrackbackPings(int postId,
			AsyncCallback<ArrayList<TrackBackPing>> callback) {
		getMovableTypeService().getTrackbackPings(postId, callback);
	}

	@Override
	public void publishPost(int postId, AsyncCallback<Integer> callback) {
		getMovableTypeService().publishPost(postId,	getWpUserName(), getWpPassword(), callback);
	}

	@Override
	public void supportedTextFilters() {
		getMovableTypeService().supportedTextFilters();
	}

}
